<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
        <form action="#">
            <table>
                <tr>
                    <td>用户名：</td>
                    <td><input type="text" placeholder="请输入用户名！"></td>
                </tr>
                <tr>
                    <td >密码：</td>
                    <td><input  id="a" type="password"></td>
                </tr>
                <tr>
                    <td>性别：</td>
                    <td><input type="radio" name="sex">男<input type="radio" name="sex">女</td>
                </tr>
                <tr>
                    <td>爱好：</td>
                    <td><input type="checkbox">篮球<input type="checkbox">乒乓球<input type="checkbox">羽毛球</td>
                </tr>
                <tr>
                    <td><input type="button" id="btn" value="提交" ></td>
                </tr>
            </table>
        </form>
        <script>
                let btn=document.getElementById('btn');
                btn.onclick=function(){
                    let pwd=document.getElementById('a');
                    console.log(pwd.value);
                }
                
        </script>

</body>
</html>